home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
util4
/
0utils.lha
/
0Utils
/
GetWord.doc
< prev
next >
Wrap
Text File
|
1995-09-05
|
1KB
|
77 lines
NAME
GetWord
SYNOPSIS
GetWord - get one in a list of words - Requires v37
INPUTS
"NUMBER/N/A,WORDS/M"
DESCRIPTION
get a number and a couple of strings and
find the n-th string starting with 1.
Negative numbers cause counting with the
last word.
The resulting string is sent to STDOUT.
Numbers, that exceed the number of words,
result in a returncode "10" (so does number=0)
RESULT
word [number-1]
NOTES
* CLI - only
* should compile with SAS-C
BUGS
there are problems, if GetWord is invoked with
wrong word number in Scripts: for unknown reason
the secondary result is cleared early.
(see .KnownBugs)
The documentation wrongly stated a returncode 9
on wrong numbers.
EXAMPLES
>GetWord 1 ali baba
"ali"
>GetWord -1 ali baba
"baba"
>GetWord 3 ali baba
"GetWord: bad number"
HISTORY
01-08-93 b_noll created
23-08-93 b_noll completed
11-02-95 b_noll slight changes
20-02-95 b_noll restructured source
21-02-95 b_noll added version/format-prefix/offset
20-03-95 b_noll added args diagnostics
19-08-95 b_noll created .data file
AUTHOR
Bernd Noll, Brunnenstrasse 55, D-67661 Kaiserslautern
noll@student.uni-kl.de